/*********************************************************************************/
/*                                                                               */
/*      DIO Driver                                                               */
/*                                                                               */
/*      Last updated by:   CBS                                                   */
/*      Last update date:  2013/2/22                                             */
/*      Revision:          0                                                     */
/*      Copyright:         DENSO                                                 */
/*                                                                               */
/*********************************************************************************/

#ifndef DIO_CFG_H_
#define DIO_CFG_H_

/*********************************************************************************/
/*  include files                                                                */
/*********************************************************************************/
#include "Std_Types.h"
#include "MPC5674F_MVx264.h"

#define DIO_DEV_ERROR_DETECT		STD_ON
#define DIO_VERSION_INFO_API		STD_ON
#define DIO_CHANNEL_TOTAL_NUM       (sizeof(SIU.PCR)/sizeof(U2))
#define DIO_PORT_TOTAL_NUM          (sizeof(SIU.PGPDO)/sizeof(U4))

typedef U4 Dio_ChannelType;
typedef U1 Dio_PortType;

typedef struct
{
  Dio_PortType port;
  U1 offset;
  U4 mask;
} Dio_ChannelGroupType;


/* HW specific DIO ports definitions.*/
typedef enum
{
  DIO_PORT_A = 0,
  DIO_PORT_B = 1,
  DIO_PORT_C = 2,
  DIO_PORT_D = 3,
  DIO_PORT_E = 4,
  DIO_PORT_F = 5,
  DIO_PORT_G = 6,
  DIO_PORT_H = 7,
  DIO_PORT_I = 8,
  DIO_PORT_J = 9,
  DIO_PORT_K = 10,
  DIO_PORT_L = 11,
  DIO_PORT_M = 12,
  DIO_PORT_N = 13,
  DIO_PORT_O = 14,
  DIO_PORT_P = 15
} Dio_PortContainer;

/* HW specific DIO channels definitons.*/

#define DIO_CHANNEL_A0 		0  	        /* PIN	0 */
#define DIO_CHANNEL_A1		1  	        /* PIN	1 */
#define DIO_CHANNEL_A2		2  	        /* PIN	2 */
#define DIO_CHANNEL_A3		3  	        /* PIN	3 */
#define DIO_CHANNEL_A4		4  	        /* PIN	4 */
#define DIO_CHANNEL_A5		5  	        /* PIN	5 */
#define DIO_CHANNEL_A6		6  	        /* PIN	6 */
#define DIO_CHANNEL_A7		7  	        /* PIN	7 */
#define DIO_CHANNEL_A8		8  	        /* PIN	8 */
#define DIO_CHANNEL_A9		9  	        /* PIN	9 */
#define DIO_CHANNEL_A10		10 	        /* PIN	10 */
#define DIO_CHANNEL_A11		11 	        /* PIN	11 */
#define DIO_CHANNEL_A12		12 	        /* PIN	12 */
#define DIO_CHANNEL_A13		13 	        /* PIN	13 */
#define DIO_CHANNEL_A14		14 	        /* PIN	14 */
#define DIO_CHANNEL_A15		15 	        /* PIN	15 */
#define DIO_CHANNEL_A16 	16 	        /* PIN	16 */
#define DIO_CHANNEL_A17		17 	        /* PIN	17 */
#define DIO_CHANNEL_A18		18 	        /* PIN	18 */
#define DIO_CHANNEL_A19		19 	        /* PIN	19 */
#define DIO_CHANNEL_A20		20 	        /* PIN	20 */
#define DIO_CHANNEL_A21		21 	        /* PIN	21 */
#define DIO_CHANNEL_A22		22 	        /* PIN	22 */
#define DIO_CHANNEL_A23		23 	        /* PIN	23 */
#define DIO_CHANNEL_A24		24 	        /* PIN	24 */
#define DIO_CHANNEL_A25		25 	        /* PIN	25 */
#define DIO_CHANNEL_A26		26 	        /* PIN	26 */
#define DIO_CHANNEL_A27		27 	        /* PIN	27 */
#define DIO_CHANNEL_A28		28  	    /* PIN	28 */
#define DIO_CHANNEL_A29		29 	        /* PIN	29 */
#define DIO_CHANNEL_A30		30 	        /* PIN	30 */
#define DIO_CHANNEL_A31		31 	        /* PIN	31 */

#define DIO_CHANNEL_B0 		32 	        /* PIN	32 */
#define DIO_CHANNEL_B1		33 	        /* PIN	33 */
#define DIO_CHANNEL_B2		34 	        /* PIN	34 */
#define DIO_CHANNEL_B3		35 	        /* PIN	35 */
#define DIO_CHANNEL_B4		36 	        /* PIN	36 */
#define DIO_CHANNEL_B5		37 	        /* PIN	37 */
#define DIO_CHANNEL_B6		38 	        /* PIN	38 */
#define DIO_CHANNEL_B7		39 	        /* PIN	39 */
#define DIO_CHANNEL_B8		40 	        /* PIN	40 */
#define DIO_CHANNEL_B9		41          /* PIN	41 */
#define DIO_CHANNEL_B10		42 	        /* PIN	42 */
#define DIO_CHANNEL_B11		43 	        /* PIN	43 */
#define DIO_CHANNEL_B12		44 	        /* PIN	44 */
#define DIO_CHANNEL_B13		45 	        /* PIN	45 */
#define DIO_CHANNEL_B14		46 	        /* PIN	46 */
#define DIO_CHANNEL_B15		47 	        /* PIN	47 */
#define DIO_CHANNEL_B16 	48 	        /* PIN	48 */
#define DIO_CHANNEL_B17		49 	        /* PIN	49 */
#define DIO_CHANNEL_B18		50 	        /* PIN	50 */
#define DIO_CHANNEL_B19		51 	        /* PIN	51 */
#define DIO_CHANNEL_B20		52          /* PIN	52 */
#define DIO_CHANNEL_B21		53 	        /* PIN	53 */
#define DIO_CHANNEL_B22		54 	        /* PIN	54 */
#define DIO_CHANNEL_B23		55 	        /* PIN	55 */
#define DIO_CHANNEL_B24		56 	        /* PIN	56 */
#define DIO_CHANNEL_B25		57 	        /* PIN	57 */
#define DIO_CHANNEL_B26		58 	        /* PIN	58 */
#define DIO_CHANNEL_B27		59 	        /* PIN	59 */
#define DIO_CHANNEL_B28		60 	        /* PIN	60 */
#define DIO_CHANNEL_B29		61 	        /* PIN	61 */
#define DIO_CHANNEL_B30		62 	        /* PIN	62 */
#define DIO_CHANNEL_B31		63 	        /* PIN	63 */

#define DIO_CHANNEL_C0 		64 	    	/* PIN	64 */
#define DIO_CHANNEL_C1		65 	    	/* PIN	65 */
#define DIO_CHANNEL_C2		66 	    	/* PIN	66 */
#define DIO_CHANNEL_C3		67 	    	/* PIN	67 */
#define DIO_CHANNEL_C4		68 	     	/* PIN	68 */
#define DIO_CHANNEL_C5		69 	    	/* PIN	69 */
#define DIO_CHANNEL_C6		70 	    	/* PIN	70 */
#define DIO_CHANNEL_C7		71 	    	/* PIN	71 */
#define DIO_CHANNEL_C8		72 	    	/* PIN	72 */
#define DIO_CHANNEL_C9		73 	    	/* PIN	73 */
#define DIO_CHANNEL_C10		74 		    /* PIN	74 */
#define DIO_CHANNEL_C11		75 		    /* PIN	75 */
#define DIO_CHANNEL_C12		76 	    	/* PIN	76 */
#define DIO_CHANNEL_C13		77 	    	/* PIN	77 */
#define DIO_CHANNEL_C14		78 	    	/* PIN	78 */
#define DIO_CHANNEL_C15		79 	    	/* PIN	79 */
#define DIO_CHANNEL_C16 	80 	    	/* PIN	80 */
#define DIO_CHANNEL_C17		81 	        /* PIN	81 */
#define DIO_CHANNEL_C18		82 	    	/* PIN	82 */
#define DIO_CHANNEL_C19		83 	    	/* PIN	83 */
#define DIO_CHANNEL_C20		84 		    /* PIN	84 */
#define DIO_CHANNEL_C21		85 		    /* PIN	85 */
#define DIO_CHANNEL_C22		86 	    	/* PIN	86 */
#define DIO_CHANNEL_C23		87 	    	/* PIN	87 */
#define DIO_CHANNEL_C24		88 	    	/* PIN	88 */
#define DIO_CHANNEL_C25		89 	    	/* PIN	89 */
#define DIO_CHANNEL_C26		90 	    	/* PIN	90 */
#define DIO_CHANNEL_C27		91 	        /* PIN	91 */
#define DIO_CHANNEL_C28		92 	    	/* PIN	92 */
#define DIO_CHANNEL_C29		93 	    	/* PIN	93 */
#define DIO_CHANNEL_C30		94 		    /* PIN	94 */
#define DIO_CHANNEL_C31		95 		    /* PIN	95 */

#define DIO_CHANNEL_D0 		96 	    	/* PIN	96 */
#define DIO_CHANNEL_D1		97 	    	/* PIN	97 */
#define DIO_CHANNEL_D2		98 	    	/* PIN	98 */
#define DIO_CHANNEL_D3		99 	    	/* PIN	99 */
#define DIO_CHANNEL_D4		100	    	/* PIN	100 */
#define DIO_CHANNEL_D5		101	    	/* PIN	101 */
#define DIO_CHANNEL_D6		102	    	/* PIN	102 */
#define DIO_CHANNEL_D7		103	    	/* PIN	103 */
#define DIO_CHANNEL_D8		104	    	/* PIN	104 */
#define DIO_CHANNEL_D9		105	    	/* PIN	105 */
#define DIO_CHANNEL_D10		106	    	/* PIN	106 */
#define DIO_CHANNEL_D11		107	    	/* PIN	107 */
#define DIO_CHANNEL_D12		108	    	/* PIN	108 */
#define DIO_CHANNEL_D13		109	    	/* PIN	109 */
#define DIO_CHANNEL_D14		110	    	/* PIN	110 */
#define DIO_CHANNEL_D15		111	    	/* PIN	111 */
#define DIO_CHANNEL_D16 	112	    	/* PIN	112 */
#define DIO_CHANNEL_D17		113	    	/* PIN	113 */
#define DIO_CHANNEL_D18		114	    	/* PIN	114 */
#define DIO_CHANNEL_D19		115	    	/* PIN	115 */
#define DIO_CHANNEL_D20		116	    	/* PIN	116 */
#define DIO_CHANNEL_D21		117	    	/* PIN	117 */
#define DIO_CHANNEL_D22		118	    	/* PIN	118 */
#define DIO_CHANNEL_D23		119	    	/* PIN	119 */
#define DIO_CHANNEL_D24		120	    	/* PIN	120 */
#define DIO_CHANNEL_D25		121	    	/* PIN	121 */
#define DIO_CHANNEL_D26		122	    	/* PIN	122 */
#define DIO_CHANNEL_D27		123	    	/* PIN	123 */
#define DIO_CHANNEL_D28		124	    	/* PIN	124 */
#define DIO_CHANNEL_D29		125	    	/* PIN	125 */
#define DIO_CHANNEL_D30		126	    	/* PIN	126 */
#define DIO_CHANNEL_D31		127	    	/* PIN	127 */

#define DIO_CHANNEL_E0 		128	    	/* PIN	128 */
#define DIO_CHANNEL_E1		129	    	/* PIN	129 */
#define DIO_CHANNEL_E2		130	    	/* PIN	130 */
#define DIO_CHANNEL_E3		131	    	/* PIN	131 */
#define DIO_CHANNEL_E4		132	    	/* PIN	132 */
#define DIO_CHANNEL_E5		133	    	/* PIN	133 */
#define DIO_CHANNEL_E6		134	    	/* PIN	134 */
#define DIO_CHANNEL_E7		135	    	/* PIN	135 */
#define DIO_CHANNEL_E8		136	    	/* PIN	136 */
#define DIO_CHANNEL_E9		137	    	/* PIN	137 */
#define DIO_CHANNEL_E10		138	    	/* PIN	138 */
#define DIO_CHANNEL_E11		139	    	/* PIN	139 */
#define DIO_CHANNEL_E12		140	    	/* PIN	140 */
#define DIO_CHANNEL_E13		141	    	/* PIN	141 */
#define DIO_CHANNEL_E14		142	    	/* PIN	142 */
#define DIO_CHANNEL_E15		143	    	/* PIN	143 */
#define DIO_CHANNEL_E16 	144	    	/* PIN	144 */
#define DIO_CHANNEL_E17		145	    	/* PIN	145 */
#define DIO_CHANNEL_E18		146	    	/* PIN	146 */
#define DIO_CHANNEL_E19		147	    	/* PIN	147 */
#define DIO_CHANNEL_E20		148	    	/* PIN	148 */
#define DIO_CHANNEL_E21		149	    	/* PIN	149 */
#define DIO_CHANNEL_E22		150	    	/* PIN	150 */
#define DIO_CHANNEL_E23		151	    	/* PIN	151 */
#define DIO_CHANNEL_E24		152	    	/* PIN	152 */
#define DIO_CHANNEL_E25		153	    	/* PIN	153 */
#define DIO_CHANNEL_E26		154	    	/* PIN	154 */
#define DIO_CHANNEL_E27		155	    	/* PIN	155 */
#define DIO_CHANNEL_E28		156	    	/* PIN	156 */
#define DIO_CHANNEL_E29		157	    	/* PIN	157 */
#define DIO_CHANNEL_E30		158	    	/* PIN	158 */
#define DIO_CHANNEL_E31		159	    	/* PIN	159 */

#define DIO_CHANNEL_F0 		160	    	/* PIN	160 */
#define DIO_CHANNEL_F1		161	    	/* PIN	161 */
#define DIO_CHANNEL_F2		162	    	/* PIN	162 */
#define DIO_CHANNEL_F3		163	    	/* PIN	163 */
#define DIO_CHANNEL_F4		164	    	/* PIN	164 */
#define DIO_CHANNEL_F5		165	    	/* PIN	165 */
#define DIO_CHANNEL_F6		166	    	/* PIN	166 */
#define DIO_CHANNEL_F7		167	    	/* PIN	167 */
#define DIO_CHANNEL_F8		168	    	/* PIN	168 */
#define DIO_CHANNEL_F9		169	    	/* PIN	169 */
#define DIO_CHANNEL_F10		170	    	/* PIN	170 */
#define DIO_CHANNEL_F11		171	    	/* PIN	171 */
#define DIO_CHANNEL_F12		172	    	/* PIN	172 */
#define DIO_CHANNEL_F13		173	    	/* PIN	173 */
#define DIO_CHANNEL_F14		174	    	/* PIN	174 */
#define DIO_CHANNEL_F15		175	    	/* PIN	175 */
#define DIO_CHANNEL_F16 	176	    	/* PIN	176 */
#define DIO_CHANNEL_F17		177	    	/* PIN	177 */
#define DIO_CHANNEL_F18		178	    	/* PIN	178 */
#define DIO_CHANNEL_F19		179	    	/* PIN	179 */
#define DIO_CHANNEL_F20		180	    	/* PIN	180 */
#define DIO_CHANNEL_F21		181	    	/* PIN	181 */
#define DIO_CHANNEL_F22		182	    	/* PIN	182 */
#define DIO_CHANNEL_F23		183	    	/* PIN	183 */
#define DIO_CHANNEL_F24		184	    	/* PIN	184 */
#define DIO_CHANNEL_F25		185	    	/* PIN	185 */
#define DIO_CHANNEL_F26		186	    	/* PIN	186 */
#define DIO_CHANNEL_F27		187	    	/* PIN	187 */
#define DIO_CHANNEL_F28		188	    	/* PIN	188 */
#define DIO_CHANNEL_F29		189	    	/* PIN	189 */
#define DIO_CHANNEL_F30		190	    	/* PIN	190 */
#define DIO_CHANNEL_F31		191	    	/* PIN	191 */

#define DIO_CHANNEL_G0 		192	    	/* PIN	192 */
#define DIO_CHANNEL_G1		193	    	/* PIN	193 */
#define DIO_CHANNEL_G2		194	    	/* PIN	194 */
#define DIO_CHANNEL_G3		195	    	/* PIN	195 */
#define DIO_CHANNEL_G4		196	    	/* PIN	196 */
#define DIO_CHANNEL_G5		197	    	/* PIN	197 */
#define DIO_CHANNEL_G6		198	    	/* PIN	198 */
#define DIO_CHANNEL_G7		199	    	/* PIN	199 */
#define DIO_CHANNEL_G8		200	    	/* PIN	200 */
#define DIO_CHANNEL_G9		201	    	/* PIN	201 */
#define DIO_CHANNEL_G10		202	    	/* PIN	202 */
#define DIO_CHANNEL_G11		203	    	/* PIN	203 */
#define DIO_CHANNEL_G12		204	    	/* PIN	204 */
#define DIO_CHANNEL_G13		205	    	/* PIN	205 */
#define DIO_CHANNEL_G14		206	    	/* PIN	206 */
#define DIO_CHANNEL_G15		207	    	/* PIN	207 */
#define DIO_CHANNEL_G16 	208	    	/* PIN	208 */
#define DIO_CHANNEL_G17		209	    	/* PIN	209 */
#define DIO_CHANNEL_G18		210	    	/* PIN	210 */
#define DIO_CHANNEL_G19		211	    	/* PIN	211 */
#define DIO_CHANNEL_G20		212	    	/* PIN	212 */
#define DIO_CHANNEL_G21		213	    	/* PIN	213 */
#define DIO_CHANNEL_G22		214	    	/* PIN	214 */
#define DIO_CHANNEL_G23		215	    	/* PIN	215 */
#define DIO_CHANNEL_G24		216	    	/* PIN	216 */
#define DIO_CHANNEL_G25		217	    	/* PIN	217 */
#define DIO_CHANNEL_G26		218	    	/* PIN	218 */
#define DIO_CHANNEL_G27		219	    	/* PIN	219 */
#define DIO_CHANNEL_G28		220	    	/* PIN	220 */
#define DIO_CHANNEL_G29		221	    	/* PIN	221 */
#define DIO_CHANNEL_G30		222	    	/* PIN	222 */
#define DIO_CHANNEL_G31		223	    	/* PIN	223 */

#define DIO_CHANNEL_H0 		224	    	/* PIN	224 */
#define DIO_CHANNEL_H1		225	    	/* PIN	225 */
#define DIO_CHANNEL_H2		226	    	/* PIN	226 */
#define DIO_CHANNEL_H3		227	    	/* PIN	227 */
#define DIO_CHANNEL_H4		228	    	/* PIN	228 */
#define DIO_CHANNEL_H5		229	    	/* PIN	229 */
#define DIO_CHANNEL_H6		230	    	/* PIN	230 */
#define DIO_CHANNEL_H7		231	    	/* PIN	231 */
#define DIO_CHANNEL_H8		232	    	/* PIN	232 */
#define DIO_CHANNEL_H9		233	    	/* PIN	233 */
#define DIO_CHANNEL_H10		234	    	/* PIN	234 */
#define DIO_CHANNEL_H11		235	    	/* PIN	235 */
#define DIO_CHANNEL_H12		236	    	/* PIN	236 */
#define DIO_CHANNEL_H13		237	    	/* PIN	237 */
#define DIO_CHANNEL_H14		238	    	/* PIN	238 */
#define DIO_CHANNEL_H15		239	    	/* PIN	239 */
#define DIO_CHANNEL_H16 	240	    	/* PIN	240 */
#define DIO_CHANNEL_H17		241	    	/* PIN	241 */
#define DIO_CHANNEL_H18		242	    	/* PIN	242 */
#define DIO_CHANNEL_H19		243	    	/* PIN	243 */
#define DIO_CHANNEL_H20		244	    	/* PIN	244 */
#define DIO_CHANNEL_H21		245	    	/* PIN	245 */
#define DIO_CHANNEL_H22		246	    	/* PIN	246 */
#define DIO_CHANNEL_H23		247	    	/* PIN	247 */
#define DIO_CHANNEL_H24		248	    	/* PIN	248 */
#define DIO_CHANNEL_H25		249	    	/* PIN	249 */
#define DIO_CHANNEL_H26		250	    	/* PIN	250 */
#define DIO_CHANNEL_H27		251	    	/* PIN	251 */
#define DIO_CHANNEL_H28		252	    	/* PIN	252 */
#define DIO_CHANNEL_H29		253	    	/* PIN	253 */
#define DIO_CHANNEL_H30		254	    	/* PIN	254 */
#define DIO_CHANNEL_H31		255	    	/* PIN	255 */

#define DIO_CHANNEL_I0 		256	    	/* PIN	256 */
#define DIO_CHANNEL_I1		257	    	/* PIN	257 */
#define DIO_CHANNEL_I2		258	    	/* PIN	258 */
#define DIO_CHANNEL_I3		259	    	/* PIN	259 */
#define DIO_CHANNEL_I4		260	    	/* PIN	260 */
#define DIO_CHANNEL_I5		261	    	/* PIN	261 */
#define DIO_CHANNEL_I6		262	    	/* PIN	262 */
#define DIO_CHANNEL_I7		263	    	/* PIN	263 */
#define DIO_CHANNEL_I8		264	    	/* PIN	264 */
#define DIO_CHANNEL_I9		265	    	/* PIN	265 */
#define DIO_CHANNEL_I10		266	    	/* PIN	266 */
#define DIO_CHANNEL_I11		267	    	/* PIN	267 */
#define DIO_CHANNEL_I12		268	    	/* PIN	268 */
#define DIO_CHANNEL_I13		269	    	/* PIN	269 */
#define DIO_CHANNEL_I14		270	    	/* PIN	270 */
#define DIO_CHANNEL_I15		271	    	/* PIN	271 */
#define DIO_CHANNEL_I16 	272	    	/* PIN	272 */
#define DIO_CHANNEL_I17		273	    	/* PIN	273 */
#define DIO_CHANNEL_I18		274	    	/* PIN	274 */
#define DIO_CHANNEL_I19		275	    	/* PIN	275 */
#define DIO_CHANNEL_I20		276	    	/* PIN	276 */
#define DIO_CHANNEL_I21		277	    	/* PIN	277 */
#define DIO_CHANNEL_I22		278	    	/* PIN	278 */
#define DIO_CHANNEL_I23		279	    	/* PIN	279 */
#define DIO_CHANNEL_I24		280	    	/* PIN	280 */
#define DIO_CHANNEL_I25		281	    	/* PIN	281 */
#define DIO_CHANNEL_I26		282	    	/* PIN	282 */
#define DIO_CHANNEL_I27		283	    	/* PIN	283 */
#define DIO_CHANNEL_I28		284	    	/* PIN	284 */
#define DIO_CHANNEL_I29		285	    	/* PIN	285 */
#define DIO_CHANNEL_I30		286	    	/* PIN	286 */
#define DIO_CHANNEL_I31		287	    	/* PIN	287 */

#define DIO_CHANNEL_J0 		288	    	/* PIN	288 */
#define DIO_CHANNEL_J1		289	    	/* PIN	289 */
#define DIO_CHANNEL_J2		290	    	/* PIN	290 */
#define DIO_CHANNEL_J3		291	    	/* PIN	291 */
#define DIO_CHANNEL_J4		292	    	/* PIN	292 */
#define DIO_CHANNEL_J5		293	    	/* PIN	293 */
#define DIO_CHANNEL_J6		294	    	/* PIN	294 */
#define DIO_CHANNEL_J7		295	    	/* PIN	295 */
#define DIO_CHANNEL_J8		296	    	/* PIN	296 */
#define DIO_CHANNEL_J9		297	    	/* PIN	297 */
#define DIO_CHANNEL_J10		298	    	/* PIN	298 */
#define DIO_CHANNEL_J11		299	    	/* PIN	299 */
#define DIO_CHANNEL_J12		300	    	/* PIN	300 */
#define DIO_CHANNEL_J13		301	    	/* PIN	301 */
#define DIO_CHANNEL_J14		302	    	/* PIN	302 */
#define DIO_CHANNEL_J15		303	    	/* PIN	303 */
#define DIO_CHANNEL_J16 	304	    	/* PIN	304 */
#define DIO_CHANNEL_J17		305	    	/* PIN	305 */
#define DIO_CHANNEL_J18		306	    	/* PIN	306 */
#define DIO_CHANNEL_J19		307	    	/* PIN	307 */
#define DIO_CHANNEL_J20		308	    	/* PIN	308 */
#define DIO_CHANNEL_J21		309	    	/* PIN	309 */
#define DIO_CHANNEL_J22		310	    	/* PIN	310 */
#define DIO_CHANNEL_J23		311	    	/* PIN	311 */
#define DIO_CHANNEL_J24		312	    	/* PIN	312 */
#define DIO_CHANNEL_J25		313	    	/* PIN	313 */
#define DIO_CHANNEL_J26		314	    	/* PIN	314 */
#define DIO_CHANNEL_J27		315	    	/* PIN	315 */
#define DIO_CHANNEL_J28		316	    	/* PIN	316 */
#define DIO_CHANNEL_J29		317	    	/* PIN	317 */
#define DIO_CHANNEL_J30		318	    	/* PIN	318 */
#define DIO_CHANNEL_J31		319	    	/* PIN	319 */

#define DIO_CHANNEL_K0 		320	    	/* PIN	320 */
#define DIO_CHANNEL_K1		321	    	/* PIN	321 */
#define DIO_CHANNEL_K2		322	    	/* PIN	322 */
#define DIO_CHANNEL_K3		323	    	/* PIN	323 */
#define DIO_CHANNEL_K4		324	    	/* PIN	324 */
#define DIO_CHANNEL_K5		325	    	/* PIN	325 */
#define DIO_CHANNEL_K6		326	    	/* PIN	326 */
#define DIO_CHANNEL_K7		327	    	/* PIN	327 */
#define DIO_CHANNEL_K8		328	    	/* PIN	328 */
#define DIO_CHANNEL_K9		329	    	/* PIN	329 */
#define DIO_CHANNEL_K10		330	    	/* PIN	330 */
#define DIO_CHANNEL_K11		331	    	/* PIN	331 */
#define DIO_CHANNEL_K12		332	    	/* PIN	332 */
#define DIO_CHANNEL_K13		333	    	/* PIN	333 */
#define DIO_CHANNEL_K14		334	    	/* PIN	334 */
#define DIO_CHANNEL_K15		335	    	/* PIN	335 */
#define DIO_CHANNEL_K16 	336	    	/* PIN	336 */
#define DIO_CHANNEL_K17		337	    	/* PIN	337 */
#define DIO_CHANNEL_K18		338	    	/* PIN	338 */
#define DIO_CHANNEL_K19		339	    	/* PIN	339 */
#define DIO_CHANNEL_K20		340	    	/* PIN	340 */
#define DIO_CHANNEL_K21		341	    	/* PIN	341 */
#define DIO_CHANNEL_K22		342	    	/* PIN	342 */
#define DIO_CHANNEL_K23		343	    	/* PIN	343 */
#define DIO_CHANNEL_K24		344	    	/* PIN	344 */
#define DIO_CHANNEL_K25		345	    	/* PIN	345 */
#define DIO_CHANNEL_K26		346	    	/* PIN	346 */
#define DIO_CHANNEL_K27		347	    	/* PIN	347 */
#define DIO_CHANNEL_K28		348	    	/* PIN	348 */
#define DIO_CHANNEL_K29		349	    	/* PIN	349 */
#define DIO_CHANNEL_K30		350	    	/* PIN	350 */
#define DIO_CHANNEL_K31		351	    	/* PIN	351 */

#define DIO_CHANNEL_L0 		352	    	/* PIN	352 */
#define DIO_CHANNEL_L1		353	    	/* PIN	353 */
#define DIO_CHANNEL_L2		354	    	/* PIN	354 */
#define DIO_CHANNEL_L3		355	    	/* PIN	355 */
#define DIO_CHANNEL_L4		356	    	/* PIN	356 */
#define DIO_CHANNEL_L5		357	    	/* PIN	357 */
#define DIO_CHANNEL_L6		358	    	/* PIN	358 */
#define DIO_CHANNEL_L7		359	    	/* PIN	359 */
#define DIO_CHANNEL_L8		360	    	/* PIN	360 */
#define DIO_CHANNEL_L9		361	    	/* PIN	361 */
#define DIO_CHANNEL_L10		362	    	/* PIN	362 */
#define DIO_CHANNEL_L11		363	    	/* PIN	363 */
#define DIO_CHANNEL_L12		364	    	/* PIN	364 */
#define DIO_CHANNEL_L13		365	    	/* PIN	365 */
#define DIO_CHANNEL_L14		366	    	/* PIN	366 */
#define DIO_CHANNEL_L15		367	    	/* PIN	367 */
#define DIO_CHANNEL_L16 	368	    	/* PIN	368 */
#define DIO_CHANNEL_L17		369	    	/* PIN	369 */
#define DIO_CHANNEL_L18		370	    	/* PIN	370 */
#define DIO_CHANNEL_L19		371	    	/* PIN	371 */
#define DIO_CHANNEL_L20		372	    	/* PIN	372 */
#define DIO_CHANNEL_L21		373	    	/* PIN	373 */
#define DIO_CHANNEL_L22		374	    	/* PIN	374 */
#define DIO_CHANNEL_L23		375	    	/* PIN	375 */
#define DIO_CHANNEL_L24		376	    	/* PIN	376 */
#define DIO_CHANNEL_L25		377	    	/* PIN	377 */
#define DIO_CHANNEL_L26		378	    	/* PIN	378 */
#define DIO_CHANNEL_L27		379	    	/* PIN	379 */
#define DIO_CHANNEL_L28		380	    	/* PIN	380 */
#define DIO_CHANNEL_L29		381	    	/* PIN	381 */
#define DIO_CHANNEL_L30		382	    	/* PIN	382 */
#define DIO_CHANNEL_L31		383	    	/* PIN	383 */

#define DIO_CHANNEL_M0 		384	    	/* PIN	384 */
#define DIO_CHANNEL_M1		385	    	/* PIN	385 */
#define DIO_CHANNEL_M2		386	    	/* PIN	386 */
#define DIO_CHANNEL_M3		387	    	/* PIN	387 */
#define DIO_CHANNEL_M4		388	    	/* PIN	388 */
#define DIO_CHANNEL_M5		389	    	/* PIN	389 */
#define DIO_CHANNEL_M6		390	    	/* PIN	390 */
#define DIO_CHANNEL_M7		391	    	/* PIN	391 */
#define DIO_CHANNEL_M8		392	    	/* PIN	392 */
#define DIO_CHANNEL_M9		393	    	/* PIN	393 */
#define DIO_CHANNEL_M10		394	    	/* PIN	394 */
#define DIO_CHANNEL_M11		395	    	/* PIN	395 */
#define DIO_CHANNEL_M12		396	    	/* PIN	396 */
#define DIO_CHANNEL_M13		397	    	/* PIN	397 */
#define DIO_CHANNEL_M14		398	    	/* PIN	398 */
#define DIO_CHANNEL_M15		399	    	/* PIN	399 */
#define DIO_CHANNEL_M16 	400	    	/* PIN	400 */
#define DIO_CHANNEL_M17		401	    	/* PIN	401 */
#define DIO_CHANNEL_M18		402	    	/* PIN	402 */
#define DIO_CHANNEL_M19		403	    	/* PIN	403 */
#define DIO_CHANNEL_M20		404	    	/* PIN	404 */
#define DIO_CHANNEL_M21		405	    	/* PIN	405 */
#define DIO_CHANNEL_M22		406	    	/* PIN	406 */
#define DIO_CHANNEL_M23		407	    	/* PIN	407 */
#define DIO_CHANNEL_M24		408	    	/* PIN	408 */
#define DIO_CHANNEL_M25		409	    	/* PIN	409 */
#define DIO_CHANNEL_M26		410	    	/* PIN	410 */
#define DIO_CHANNEL_M27		411	    	/* PIN	411 */
#define DIO_CHANNEL_M28		412	    	/* PIN	412 */
#define DIO_CHANNEL_M29		413	    	/* PIN	413 */
#define DIO_CHANNEL_M30		414	    	/* PIN	414 */
#define DIO_CHANNEL_M31		415	    	/* PIN	415 */
                                
#define DIO_CHANNEL_N0 		416	    	/* PIN	416 */
#define DIO_CHANNEL_N1		417	    	/* PIN	417 */
#define DIO_CHANNEL_N2		418	    	/* PIN	418 */
#define DIO_CHANNEL_N3		419	    	/* PIN	419 */
#define DIO_CHANNEL_N4		420	    	/* PIN	420 */
#define DIO_CHANNEL_N5		421	    	/* PIN	421 */
#define DIO_CHANNEL_N6		422	    	/* PIN	422 */
#define DIO_CHANNEL_N7		423	    	/* PIN	423 */
#define DIO_CHANNEL_N8		424	    	/* PIN	424 */
#define DIO_CHANNEL_N9		425	    	/* PIN	425 */
#define DIO_CHANNEL_N10		426	    	/* PIN	426 */
#define DIO_CHANNEL_N11		427	    	/* PIN	427 */
#define DIO_CHANNEL_N12		428	    	/* PIN	428 */
#define DIO_CHANNEL_N13		429	    	/* PIN	429 */
#define DIO_CHANNEL_N14		430	    	/* PIN	430 */
#define DIO_CHANNEL_N15		431	    	/* PIN	431 */
#define DIO_CHANNEL_N16 	432	    	/* PIN	432 */
#define DIO_CHANNEL_N17		433	    	/* PIN	433 */
#define DIO_CHANNEL_N18		434	    	/* PIN	434 */
#define DIO_CHANNEL_N19		435	    	/* PIN	435 */
#define DIO_CHANNEL_N20		436	    	/* PIN	436 */
#define DIO_CHANNEL_N21		437	    	/* PIN	437 */
#define DIO_CHANNEL_N22		438	    	/* PIN	438 */
#define DIO_CHANNEL_N23		439	    	/* PIN	439 */
#define DIO_CHANNEL_N24		440	    	/* PIN	440 */
#define DIO_CHANNEL_N25		441	    	/* PIN	441 */
#define DIO_CHANNEL_N26		442	    	/* PIN	442 */
#define DIO_CHANNEL_N27		443	    	/* PIN	443 */
#define DIO_CHANNEL_N28		444	    	/* PIN	444 */
#define DIO_CHANNEL_N29		445	    	/* PIN	445 */
#define DIO_CHANNEL_N30		446	    	/* PIN	446 */
#define DIO_CHANNEL_N31		447	    	/* PIN	447 */
                                
#define DIO_CHANNEL_O0 		448	    	/* PIN	448 */
#define DIO_CHANNEL_O1		449	    	/* PIN	449 */
#define DIO_CHANNEL_O2		450	    	/* PIN	450 */
#define DIO_CHANNEL_O3		451	    	/* PIN	451 */
#define DIO_CHANNEL_O4		452	    	/* PIN	452 */
#define DIO_CHANNEL_O5		453	    	/* PIN	453 */
#define DIO_CHANNEL_O6		454	    	/* PIN	454 */
#define DIO_CHANNEL_O7		455	    	/* PIN	455 */
#define DIO_CHANNEL_O8		456	    	/* PIN	456 */
#define DIO_CHANNEL_O9		457	    	/* PIN	457 */
#define DIO_CHANNEL_O10		458	    	/* PIN	458 */
#define DIO_CHANNEL_O11		459	    	/* PIN	459 */
#define DIO_CHANNEL_O12		460	    	/* PIN	460 */
#define DIO_CHANNEL_O13		461	    	/* PIN	461 */
#define DIO_CHANNEL_O14		462	    	/* PIN	462 */
#define DIO_CHANNEL_O15		463	    	/* PIN	463 */
#define DIO_CHANNEL_O16 	464	    	/* PIN	464 */
#define DIO_CHANNEL_O17		465	    	/* PIN	465 */
#define DIO_CHANNEL_O18		466	    	/* PIN	466 */
#define DIO_CHANNEL_O19		467	    	/* PIN	467 */
#define DIO_CHANNEL_O20		468	    	/* PIN	468 */
#define DIO_CHANNEL_O21		469	    	/* PIN	469 */
#define DIO_CHANNEL_O22		470	    	/* PIN	470 */
#define DIO_CHANNEL_O23		471	    	/* PIN	471 */
#define DIO_CHANNEL_O24		472	    	/* PIN	472 */
#define DIO_CHANNEL_O25		473	    	/* PIN	473 */
#define DIO_CHANNEL_O26		474	    	/* PIN	474 */
#define DIO_CHANNEL_O27		475	    	/* PIN	475 */
#define DIO_CHANNEL_O28		476	    	/* PIN	476 */
#define DIO_CHANNEL_O29		477	    	/* PIN	477 */
#define DIO_CHANNEL_O30		478	    	/* PIN	478 */
#define DIO_CHANNEL_O31		479	    	/* PIN	479 */
                                   
#define DIO_CHANNEL_P0 		480	    	/* PIN	480 */
#define DIO_CHANNEL_P1		481	    	/* PIN	481 */
#define DIO_CHANNEL_P2		482	    	/* PIN	482 */
#define DIO_CHANNEL_P3		483	    	/* PIN	483 */
#define DIO_CHANNEL_P4		484	    	/* PIN	484 */
#define DIO_CHANNEL_P5		485	    	/* PIN	485 */
#define DIO_CHANNEL_P6		486	    	/* PIN	486 */
#define DIO_CHANNEL_P7		487	    	/* PIN	487 */
#define DIO_CHANNEL_P8		488	    	/* PIN	488 */
#define DIO_CHANNEL_P9		489	    	/* PIN	489 */
#define DIO_CHANNEL_P10		490	    	/* PIN	490 */
#define DIO_CHANNEL_P11		491	    	/* PIN	491 */
#define DIO_CHANNEL_P12		492	    	/* PIN	492 */
#define DIO_CHANNEL_P13		493	    	/* PIN	493 */
#define DIO_CHANNEL_P14		494	    	/* PIN	494 */
#define DIO_CHANNEL_P15		495	    	/* PIN	495 */
#define DIO_CHANNEL_P16 	496	    	/* PIN	496 */
#define DIO_CHANNEL_P17		497	    	/* PIN	497 */
#define DIO_CHANNEL_P18		498	    	/* PIN	498 */
#define DIO_CHANNEL_P19		499	    	/* PIN	499 */
#define DIO_CHANNEL_P20		500	    	/* PIN	500 */
#define DIO_CHANNEL_P21		501	    	/* PIN	501 */
#define DIO_CHANNEL_P22		502	    	/* PIN	502 */
#define DIO_CHANNEL_P23		503	    	/* PIN	503 */
#define DIO_CHANNEL_P24		504	    	/* PIN	504 */
#define DIO_CHANNEL_P25		505	    	/* PIN	505 */
#define DIO_CHANNEL_P26		506	    	/* PIN	506 */
#define DIO_CHANNEL_P27		507	    	/* PIN	507 */
#define DIO_CHANNEL_P28		508	    	/* PIN	508 */
#define DIO_CHANNEL_P29		509	    	/* PIN	509 */
#define DIO_CHANNEL_P30		510	    	/* PIN	510 */
#define DIO_CHANNEL_P31		511	    	/* PIN	511 */
                          
typedef struct
{
	U2 ChannelTotalNum;
	U2 PortTotalNum;
	const Dio_ChannelType *ChannelConfig;
	const Dio_PortType *PortConfig;
	const Dio_ChannelGroupType *ChannelGroupConfig;
}Dio_ConfigType;

extern const Dio_ConfigType Dio_ConfigData;




#endif /*DIO_CFG_H_*/
